package com.diandian.backend.log.param;

import com.diandian.base.boot.starter.exception.DefaultException;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.diandian.backend.log.dto.LogTaskProcessListParamDTO;

import java.io.Serializable;
import java.util.Date;

public class LogTaskProcessListParam implements Serializable {

	private String belongEql;
	private String belongLike;
	private String businessTypeEql;
	private String businessTypeLike;
	private String businessIdEql;
	private String businessIdLike;
	private String taskIdEql;
	private String taskIdLike;
	private String taskNameEql;
	private String taskNameLike;
	private String contentEql;
	private String contentLike;
	private String operaterUserIdEql;
	private String operaterUserIdLike;
	private String operatorUserNameEql;
	private String operatorUserNameLike;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTimeBefore;
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createTimeAfter;

	public void check(){
		if(this.belongEql == null || "".equals(this.belongEql)){
			throw new DefaultException("归属标识不能为空");
		}
		if(this.taskIdEql == null || "".equals(this.taskIdEql)){
			throw new DefaultException("任务ID不能为空");
		}
	}

	public LogTaskProcessListParamDTO toDTO(){
		LogTaskProcessListParamDTO result = new LogTaskProcessListParamDTO();
		result.setBelongEql(this.belongEql);
		result.setBelongLike(this.belongLike);
		result.setBusinessTypeEql(this.businessTypeEql);
		result.setBusinessTypeLike(this.businessTypeLike);
		result.setBusinessIdEql(this.businessIdEql);
		result.setBusinessIdLike(this.businessIdLike);
		result.setTaskIdEql(this.taskIdEql);
		result.setTaskIdLike(this.taskIdLike);
		result.setTaskNameEql(this.taskNameEql);
		result.setTaskNameLike(this.taskNameLike);
		result.setContentEql(this.contentEql);
		result.setContentLike(this.contentLike);
		result.setOperaterUserIdEql(this.operaterUserIdEql);
		result.setOperaterUserIdLike(this.operaterUserIdLike);
		result.setOperatorUserNameEql(this.operatorUserNameEql);
		result.setOperatorUserNameLike(this.operatorUserNameLike);
		result.setCreateTimeBefore(this.createTimeBefore);
		result.setCreateTimeAfter(this.createTimeAfter);
		return result;
	}

	public String getBelongEql() {
		return belongEql;
	}
	public void setBelongEql(String belongEql) {
		this.belongEql = belongEql;
	}
	public String getBelongLike() {
		return belongLike;
	}
	public void setBelongLike(String belongLike) {
		this.belongLike = belongLike;
	}
	public String getBusinessTypeEql() {
		return businessTypeEql;
	}
	public void setBusinessTypeEql(String businessTypeEql) {
		this.businessTypeEql = businessTypeEql;
	}
	public String getBusinessTypeLike() {
		return businessTypeLike;
	}
	public void setBusinessTypeLike(String businessTypeLike) {
		this.businessTypeLike = businessTypeLike;
	}
	public String getBusinessIdEql() {
		return businessIdEql;
	}
	public void setBusinessIdEql(String businessIdEql) {
		this.businessIdEql = businessIdEql;
	}
	public String getBusinessIdLike() {
		return businessIdLike;
	}
	public void setBusinessIdLike(String businessIdLike) {
		this.businessIdLike = businessIdLike;
	}
	public String getTaskIdEql() {
		return taskIdEql;
	}
	public void setTaskIdEql(String taskIdEql) {
		this.taskIdEql = taskIdEql;
	}
	public String getTaskIdLike() {
		return taskIdLike;
	}
	public void setTaskIdLike(String taskIdLike) {
		this.taskIdLike = taskIdLike;
	}
	public String getTaskNameEql() {
		return taskNameEql;
	}
	public void setTaskNameEql(String taskNameEql) {
		this.taskNameEql = taskNameEql;
	}
	public String getTaskNameLike() {
		return taskNameLike;
	}
	public void setTaskNameLike(String taskNameLike) {
		this.taskNameLike = taskNameLike;
	}
	public String getContentEql() {
		return contentEql;
	}
	public void setContentEql(String contentEql) {
		this.contentEql = contentEql;
	}
	public String getContentLike() {
		return contentLike;
	}
	public void setContentLike(String contentLike) {
		this.contentLike = contentLike;
	}
	public String getOperaterUserIdEql() {
		return operaterUserIdEql;
	}
	public void setOperaterUserIdEql(String operaterUserIdEql) {
		this.operaterUserIdEql = operaterUserIdEql;
	}
	public String getOperaterUserIdLike() {
		return operaterUserIdLike;
	}
	public void setOperaterUserIdLike(String operaterUserIdLike) {
		this.operaterUserIdLike = operaterUserIdLike;
	}
	public String getOperatorUserNameEql() {
		return operatorUserNameEql;
	}
	public void setOperatorUserNameEql(String operatorUserNameEql) {
		this.operatorUserNameEql = operatorUserNameEql;
	}
	public String getOperatorUserNameLike() {
		return operatorUserNameLike;
	}
	public void setOperatorUserNameLike(String operatorUserNameLike) {
		this.operatorUserNameLike = operatorUserNameLike;
	}
	public Date getCreateTimeBefore() {
		return createTimeBefore;
	}
	public void setCreateTimeBefore(Date createTimeBefore) {
		this.createTimeBefore = createTimeBefore;
	}
	public Date getCreateTimeAfter() {
		return createTimeAfter;
	}
	public void setCreateTimeAfter(Date createTimeAfter) {
		this.createTimeAfter = createTimeAfter;
	}
}
